<#if !username??>
    <div class="modal hide fade userModal" id="loginModal">
        <form id="loginForm" class="form-horizontal" action="api/signin" method="post">
            <div class="modal-header">
                <button class="close" aria-hidden="true" data-dismiss="modal" type="button">×</button>
                <h3 id="loginModalLabel">
                    登陆
                </h3>
            </div>
            <div class="modal-body">
                <div class="control-group">
                    <div class="controls">
									<span class="help-block">没有PowerOJ账号? <a href="https://www.oj.swust.edu.cn/signup" class="toSignup">点我注册</a>
									</span>
                    </div>
                </div>
                <div class="control-group <#if nameMsg??>error</#if>">
                    <label class="control-label" for="inputName">PowerOJ用户名</label>
                    <div class="controls">
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-user"></i></span>
                            <input type="text" id="inputName" name="username" value="${name!}" placeholder="User name" autofocus
                                   required style="height: 30px;">
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputPassword"> PowerOJ密码</label>
                    <div class="controls">
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-lock"></i> </span>
                            <input type="password" id="inputPassword" name="password" placeholder="Password" required style="height: 30px;">
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <span class="help-block"><a href="https://www.oj.swust.edu.cn/user/forget">忘记密码</a> </span>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <span id="loginMsg"></span>
                <button type="submit" class="btn btn-primary">登陆</button>
                <button class="btn" data-dismiss="modal">返回</button>
            </div>
        </form>
    </div>
</#if>